package com.util.result;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.stereotype.Component;

/**
 * @Description 分页
 * @Author zhu_jinsheng[zhu_js@suixingpay.com]
 * @Date 2020/6/11 21:02
 * @Version 1.0
 */
@Getter
@Setter
@Component
@NoArgsConstructor
public class Page {
    Integer currentPage;
    Integer pageSize;
    Integer totalPage;

    public Page(Integer currentPage, Integer pageSize, Integer totalPage) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.totalPage = totalPage;
    }

    public void setPage(Page page) {
        this.currentPage = page.currentPage;
        this.pageSize = page.pageSize;
        this.totalPage = page.totalPage;
    }
}
